# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ipcountry
pkgver=1.2
pkgrel=10
groups=('blackarch' 'blackarch-misc')
pkgdesc='Fetches IPv4 ranges of given country in host and cidr format.'
url='https://nullsecurity.net/tools/misc.html'
license=('custom:unknown')
arch=('any')
depends=('python' 'python-beautifulsoup4' 'python-requests')
source=("https://github.com/nullsecuritynet/tools/raw/main/misc/$pkgname/release/$pkgname-$pkgver.tar.gz")
sha512sums=('d4b010b4e3c97b44006beb9a6463ee2e94f81181e1bf5c8cc31fc856f2d301b8318386fabc95238adbeee693fe74a7fff8219a0c7e467e2e100733786fb090d8')

package() {
  cd "$pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

